@extends('admin.layout.app')

@section('title')
    评分统计详情
@endsection

@section('content')
		@component('admin.components.nav')
		@endcomponent
		<!--main-->
		<main v-cloak>
			<div class="container">
				<div class="breadcrumb">
					<div class="row">
						<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
							<h3><a href="/count">评分统计</a><i style="padding: 0 12px;">></i><span>详情</span></h3>
						</div>
						<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
							<form action="" class="form-inline form-search">
								<div class="form-group">
									<label class="sr-only" for="search-input">搜索</label>
									<input id="search-input" type="search" class="form-control" placeholder="" v-model="keywords">
								</div>
								<button type="button" class="btn btn-primary btn-search" @click="search">搜索</button>
							</form>
						</div>
					</div>
				</div>
				<div class="data-table table-responsive">
					<table class="table table-striped table-hover">
						<thead>
							<tr>
								<th>编号</th>
								<th>姓名</th>
								<th>部门</th>
								<th>职位</th>
								<th>评分</th>
								{{-- <th>评分等级</th> --}}
							</tr>
						</thead>
						<tbody>
							<tr v-for="(item,index) in list">
								<th scope="row">@{{item.user.id}}</th>
								<td>@{{item.user.name}}</td>
								<td>@{{item.user.department_name}}</td>
								<td>@{{item.user.post_name}}</td>
								<td>@{{item.value}}</td>
								{{-- <td>@{{item.level}}</td> --}}
							</tr>
						</tbody>
					</table>
				</div>
				<div class="action-panel">
					<div class="row">
						<div class="col-xs-12 col-sm-4 col-md-4 col-lg-4">
							<a :href="'/year_scores_export?id='+id" class="btn btn-primary" target="_blank">导出统计结果</a>
							<a :href="'/year_scores_all?id='+id" class="btn btn-primary" target="_blank">导出所有评分记录</a>
						</div>
						<div class="col-xs-12 col-sm-8 col-md-8 col-lg-8">
							<span>共@{{total}}条</span>
		                    <span>@{{current_page}}/@{{last_page}}页</span>
		                    <nav class="nav-pager" aria-label="...">
		                      <ul class="pager">
		                        <li :class="{disabled:current_page<=1}"><a :disabled="current_page<=1" @click="pageTurn(-1)"><span class="glyphicon glyphicon-menu-left" aria-hidden="true"></span></a></li>
		                        <li :class="{disabled:current_page>=last_page}"><a :disabled="current_page>=last_page" @click="pageTurn(1)"><span class="glyphicon glyphicon-menu-right" aria-hidden="true"></span></a></li>
		                      </ul>
		                    </nav>
		                    <form action="" class="form-inline form-pager">
		                        <div class="form-group">
		                            <label for="page-number">跳转到</label>
		                            <input type="number" id="page-number" class="form-control" placeholder="" v-model="turn_page">
		                        </div>
		                        <button type="button" class="btn btn-primary btn-goto" :disabled="!turn_page || turn_page>last_page" @click="toPage">GO</button>
		                    </form>
						</div>
					</div>
				</div>
			</div>
		</main>
@endsection

@section('script')
	<script src="/js/node_modules/urljs/src/url.min.js" type="text/javascript"></script>
	<script type="text/javascript">
        var activeIndex = 4
    </script>
    <script src="/admin/js/nav.js" type="text/javascript"></script>
	<script src="/admin/js/count_details.js" type="text/javascript"></script>
@endsection